﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Azku.UDPMessageService
{
    public partial class MsgShowForm : Form
    {

        ServiceUtil.Service m_Service = null;

        public MsgShowForm()
        {
            InitializeComponent();
        }

        private void MsgShowForm_Load(object sender, EventArgs e)
        {
            m_Service = new Azku.ServiceUtil.Service();
            m_Service.ErrorLog = ShowMsg;
            m_Service.ThreadStart();
        }
        public void ShowMsg(string msg)
        {
            Common.ErrorLog errorDelegate = delegate(string strErrMsg)
            {
                listBox1.Items.Add(msg);
            };
            listBox1.Invoke(errorDelegate, msg);
        }
    }
}
